home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / pine3.96.tar.gz / pine3.96.tar / pine3.96 / pine / osdep / creatdir < prev    next >
Text File  |  1993-07-15  |  506b  |  22 lines

  1. /*----------------------------------------------------------------------
  2.       Create the mail subdirectory.
  3.  
  4.   Args: dir -- Name of the directory to create
  5.  
  6.  Result: Directory is created.  Returns 0 on success, else -1 on error
  7.      and errno is valid.
  8.   ----*/
  9. create_mail_dir(dir)
  10.     char *dir;
  11. {
  12.     if(mkdir(dir, 0700) < 0)
  13.       return(-1);
  14.  
  15.     (void)chmod(dir, 0700);
  16.     /* Some systems need this, on others we don't care if it fails */
  17.     (void)chown(dir, getuid(), getgid());
  18.     return(0);
  19. }
  20.  
  21.  
  22.